<%= hidden_field_tag "referrer", params[:referrer] %>

<%= form.error_messages %>

<%= form.label :language %>
<div id='select_lang' class="langSelect" style="display: block;">
  <% AVAILABLE_LOCALES.each do |locale| %>
  	<%= link_to_function image_tag("manage/flag_#{locale}.gif", :alt=>locale), 
  	      :onclick=>"set_lang('#{locale}', this);", 
  	      :class=>(@post.language.to_s == locale ? "active" : "") %>
	<% end %>
</div>
<%= form.hidden_field :language %>

<%= form.label :title %><br/>
<%= form.text_field :title, :class=>'title' %>

<% block_form :width=>550 do %>
  <% fields_for "post[page_header]", @post.header || Header.new do |h| %>
    <%= h.label :title %><br/>
    <%= h.text_field :title, :class=>'text' %><br/>

    <%= h.label :keywords %><br/>
    <%= h.text_field :keywords, :class=>'text' %><br/>

    <%= h.label :description %><br/>
    <%= h.text_area :description, :cols=>70, :rows=>5 %><br/>
  <% end %>
<% end %>

<%= form.label :brief %><br/>
<%= form.text_area :brief, :cols=>70, :rows=>10 %><br/>

<%= form.check_box :is_visible %> <%= form.label :is_visible %><br/>

<p><%= form.label :created_at %>
<%= form.calendar_field :created_at, :lang=>I18n.locale.to_s %></p>

<%= form.label :content %><br/>
<%= form.cktext_area :content %><br/>


<%= form.label :position %><br/>
<%= form.text_field :position %><br/>

<%= form.label :slider, 'Флешка' %><br/>
<%= form.file_field :slider_uploaded_data %><br/>

<%= swf_object(@post.slider.url, "flash_slide_show", '534', '237', "9.0.0",  {:wmode=>"transparent", :quality=>"high"}, {:url=>@post.slider.url}, true) unless @post.slider.blank?%><br/>

<%= form.label :photo %><br/>
<%= form.file_field :photo_uploaded_data %><br/>

<%= image_tag @post.photo.url(:thumb) unless @post.photo.blank? %>

<% content_for :head, calendar_include_files %>
